.class Lcom/netease/newsreader/activity/SelectCity$3;
.super Ljava/lang/Object;
.source "SelectCity.java"

# interfaces
.implements Ljava/lang/Runnable;


# annotations
.annotation system Ldalvik/annotation/EnclosingMethod;
    value = Lcom/netease/newsreader/activity/SelectCity;->onCreate(Landroid/os/Bundle;)V
.end annotation

.annotation system Ldalvik/annotation/InnerClass;
    accessFlags = 0x0
    name = null
.end annotation


# instance fields
.field final synthetic this$0:Lcom/netease/newsreader/activity/SelectCity;


# direct methods
.method constructor <init>(Lcom/netease/newsreader/activity/SelectCity;)V
    .locals 0
    .parameter

    .prologue
    .line 1
    iput-object p1, p0, Lcom/netease/newsreader/activity/SelectCity$3;->this$0:Lcom/netease/newsreader/activity/SelectCity;

    .line 124
    invoke-direct {p0}, Ljava/lang/Object;-><init>()V

    return-void
.end method


# virtual methods
.method public run()V
    .locals 13

    .prologue
    const/4 v12, 0x1

    const/4 v11, 0x0

    .line 127
    iget-object v9, p0, Lcom/netease/newsreader/activity/SelectCity$3;->this$0:Lcom/netease/newsreader/activity/SelectCity;

    iget-object v9, v9, Lcom/netease/newsreader/activity/SelectCity;->db:Landroid/database/sqlite/SQLiteDatabase;

    invoke-static {v9}, Lcom/netease/newsreader/model/City;->getCityList(Landroid/database/sqlite/SQLiteDatabase;)Ljava/util/List;

    move-result-object v6

    .line 128
    .local v6, list:Ljava/util/List;,"Ljava/util/List<Ljava/util/Map<Ljava/lang/String;Ljava/lang/Object;>;>;"
    iget-object v9, p0, Lcom/netease/newsreader/activity/SelectCity$3;->this$0:Lcom/netease/newsreader/activity/SelectCity;

    invoke-static {v9}, Lcom/netease/newsreader/activity/SelectCity;->access$5(Lcom/netease/newsreader/activity/SelectCity;)Landroid/os/Handler;

    move-result-object v9

    invoke-virtual {v9, v11}, Landroid/os/Handler;->obtainMessage(I)Landroid/os/Message;

    move-result-object v8

    .line 129
    .local v8, msg:Landroid/os/Message;
    iput-object v6, v8, Landroid/os/Message;->obj:Ljava/lang/Object;

    .line 130
    iget-object v9, p0, Lcom/netease/newsreader/activity/SelectCity$3;->this$0:Lcom/netease/newsreader/activity/SelectCity;

    invoke-static {v9}, Lcom/netease/newsreader/activity/SelectCity;->access$5(Lcom/netease/newsreader/activity/SelectCity;)Landroid/os/Handler;

    move-result-object v9

    invoke-virtual {v9, v8}, Landroid/os/Handler;->sendMessage(Landroid/os/Message;)Z

    .line 132
    new-instance v2, Ljava/util/ArrayList;

    invoke-direct {v2}, Ljava/util/ArrayList;-><init>()V

    .line 134
    .local v2, groupList:Ljava/util/List;,"Ljava/util/List<Lcom/netease/newsreader/util/Pair<Ljava/lang/String;Ljava/util/List<Ljava/util/Map<Ljava/lang/String;Ljava/lang/Object;>;>;>;>;"
    iget-object v9, p0, Lcom/netease/newsreader/activity/SelectCity$3;->this$0:Lcom/netease/newsreader/activity/SelectCity;

    iget-object v9, v9, Lcom/netease/newsreader/activity/SelectCity;->db:Landroid/database/sqlite/SQLiteDatabase;

    invoke-static {v9}, Lcom/netease/newsreader/model/City;->getFrequentCityList(Landroid/database/sqlite/SQLiteDatabase;)Ljava/util/List;

    move-result-object v3

    .line 135
    .local v3, hotList:Ljava/util/List;,"Ljava/util/List<Ljava/util/Map<Ljava/lang/String;Ljava/lang/Object;>;>;"
    invoke-interface {v3}, Ljava/util/List;->size()I

    move-result v9

    if-lez v9, :cond_0

    .line 136
    iget-object v9, p0, Lcom/netease/newsreader/activity/SelectCity$3;->this$0:Lcom/netease/newsreader/activity/SelectCity;

    const v10, 0x7f0b00a1

    invoke-virtual {v9, v10}, Lcom/netease/newsreader/activity/SelectCity;->getString(I)Ljava/lang/String;

    move-result-object v9

    invoke-static {v9, v3}, Lcom/netease/newsreader/util/Pair;->create(Ljava/lang/Object;Ljava/lang/Object;)Lcom/netease/newsreader/util/Pair;

    move-result-object v9

    invoke-interface {v2, v9}, Ljava/util/List;->add(Ljava/lang/Object;)Z

    .line 139
    :cond_0
    new-instance v7, Ljava/util/HashMap;

    invoke-direct {v7}, Ljava/util/HashMap;-><init>()V

    .line 141
    .local v7, map:Ljava/util/Map;,"Ljava/util/Map<Ljava/lang/String;Ljava/util/List<Ljava/util/Map<Ljava/lang/String;Ljava/lang/Object;>;>;>;"
    invoke-interface {v6}, Ljava/util/List;->size()I

    move-result v0

    .line 142
    .local v0, N:I
    const/4 v4, 0x0

    .local v4, i:I
    :goto_0
    if-lt v4, v0, :cond_1

    .line 153
    const/4 v4, 0x0

    :goto_1
    invoke-static {}, Lcom/netease/newsreader/activity/SelectCity;->access$7()[Ljava/lang/String;

    move-result-object v9

    array-length v9, v9

    if-lt v4, v9, :cond_3

    .line 160
    iget-object v9, p0, Lcom/netease/newsreader/activity/SelectCity$3;->this$0:Lcom/netease/newsreader/activity/SelectCity;

    invoke-static {v9}, Lcom/netease/newsreader/activity/SelectCity;->access$5(Lcom/netease/newsreader/activity/SelectCity;)Landroid/os/Handler;

    move-result-object v9

    invoke-virtual {v9, v12}, Landroid/os/Handler;->obtainMessage(I)Landroid/os/Message;

    move-result-object v8

    .line 161
    iput-object v2, v8, Landroid/os/Message;->obj:Ljava/lang/Object;

    .line 162
    iget-object v9, p0, Lcom/netease/newsreader/activity/SelectCity$3;->this$0:Lcom/netease/newsreader/activity/SelectCity;

    invoke-static {v9}, Lcom/netease/newsreader/activity/SelectCity;->access$5(Lcom/netease/newsreader/activity/SelectCity;)Landroid/os/Handler;

    move-result-object v9

    invoke-virtual {v9, v8}, Landroid/os/Handler;->sendMessage(Landroid/os/Message;)Z

    .line 163
    return-void

    .line 143
    :cond_1
    invoke-interface {v6, v4}, Ljava/util/List;->get(I)Ljava/lang/Object;

    move-result-object v9

    check-cast v9, Ljava/util/Map;

    const-string v10, "pinyin"

    invoke-interface {v9, v10}, Ljava/util/Map;->get(Ljava/lang/Object;)Ljava/lang/Object;

    move-result-object v9

    invoke-virtual {v9}, Ljava/lang/Object;->toString()Ljava/lang/String;

    move-result-object v9

    invoke-virtual {v9, v11, v12}, Ljava/lang/String;->substring(II)Ljava/lang/String;

    move-result-object v9

    .line 144
    invoke-virtual {v9}, Ljava/lang/String;->toUpperCase()Ljava/lang/String;

    move-result-object v5

    .line 145
    .local v5, l:Ljava/lang/String;
    invoke-interface {v7, v5}, Ljava/util/Map;->get(Ljava/lang/Object;)Ljava/lang/Object;

    move-result-object v1

    check-cast v1, Ljava/util/List;

    .line 146
    .local v1, groupItem:Ljava/util/List;,"Ljava/util/List<Ljava/util/Map<Ljava/lang/String;Ljava/lang/Object;>;>;"
    if-nez v1, :cond_2

    .line 147
    new-instance v1, Ljava/util/ArrayList;

    .end local v1           #groupItem:Ljava/util/List;,"Ljava/util/List<Ljava/util/Map<Ljava/lang/String;Ljava/lang/Object;>;>;"
    invoke-direct {v1}, Ljava/util/ArrayList;-><init>()V

    .line 148
    .restart local v1       #groupItem:Ljava/util/List;,"Ljava/util/List<Ljava/util/Map<Ljava/lang/String;Ljava/lang/Object;>;>;"
    invoke-interface {v7, v5, v1}, Ljava/util/Map;->put(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;

    .line 150
    :cond_2
    invoke-interface {v6, v4}, Ljava/util/List;->get(I)Ljava/lang/Object;

    move-result-object v9

    check-cast v9, Ljava/util/Map;

    invoke-interface {v1, v9}, Ljava/util/List;->add(Ljava/lang/Object;)Z

    .line 142
    add-int/lit8 v4, v4, 0x1

    goto :goto_0

    .line 154
    .end local v1           #groupItem:Ljava/util/List;,"Ljava/util/List<Ljava/util/Map<Ljava/lang/String;Ljava/lang/Object;>;>;"
    .end local v5           #l:Ljava/lang/String;
    :cond_3
    invoke-static {}, Lcom/netease/newsreader/activity/SelectCity;->access$7()[Ljava/lang/String;

    move-result-object v9

    aget-object v9, v9, v4

    invoke-interface {v7, v9}, Ljava/util/Map;->get(Ljava/lang/Object;)Ljava/lang/Object;

    move-result-object v1

    check-cast v1, Ljava/util/List;

    .line 155
    .restart local v1       #groupItem:Ljava/util/List;,"Ljava/util/List<Ljava/util/Map<Ljava/lang/String;Ljava/lang/Object;>;>;"
    if-eqz v1, :cond_4

    .line 156
    invoke-static {}, Lcom/netease/newsreader/activity/SelectCity;->access$7()[Ljava/lang/String;

    move-result-object v9

    aget-object v9, v9, v4

    invoke-static {v9, v1}, Lcom/netease/newsreader/util/Pair;->create(Ljava/lang/Object;Ljava/lang/Object;)Lcom/netease/newsreader/util/Pair;

    move-result-object v9

    invoke-interface {v2, v9}, Ljava/util/List;->add(Ljava/lang/Object;)Z

    .line 153
    :cond_4
    add-int/lit8 v4, v4, 0x1

    goto :goto_1
.end method
